/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: syyyy
 * Date: 2025-07-24
 * Time: 12:55
 */

class Animal{
    public  String name;
    public int age;

    public void eat(){
        System.out.println(this.name+"正在吃东西");
    }
}

class Dog extends Animal {

    public void eat() {
        System.out.println(this.name + "正在吃狗粮");
    }
}


public class Test3 {
    public static void main(String[] args) {
        Animal animal=new Dog();

        if(animal instanceof Animal){
            System.out.println("haha");
        }

    }
}
